package com.craney.redTest
{
	import flash.display.Graphics;
	import flash.display.MovieClip;
	import flash.display.Sprite;
		
	public class RedClother extends MovieClip
	{
		public function RedClother()
		{
			trace("This is RedClother!");
		}
		
		public function draw(mySprite : Sprite) : void
		{
			var bgColor : int = 0xff0000;
			var size : int = 400;
			var count : int = 300;
			
			var graphics : Graphics = mySprite.graphics;
			
			graphics.beginFill(bgColor);
			for(var i:int=0; i<count; i++)
			{
				graphics.lineTo(Math.floor(size*Math.random()), Math.floor(size*Math.random()));
			}
			graphics.endFill();
			
		}		

	}
}